package com.example.rbac.uitls;

import com.example.rbac.entity.defefult.Result;

/**
 * Created by Administrator on 2017/8/23.
 */
public class ResultUtil {

    //成功的返回参数
    public static Result success(Object object){
        Result result = new Result();
        result.setCode(0);
        result.setMsg("success");
        result.setData(object);
        return result;
    }

    //失败的返回参数
    public static  Result erorr(Integer code, String msg){
        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        return  result;
    }


}
